<template>
    <div>
        <van-nav-bar title="商品详情" left-text="返回" left-arrow @click-left="() => { $router.push('/home/lb/') }" fixed />
        <div style="height: 45px;"></div>
        <div v-html="detail.goods_introduce"></div>

        <van-action-bar style="margin-bottom: 45px;">
            <van-action-bar-icon icon="chat-o" text="客服" @click="onClickIcon" />
            <van-action-bar-icon icon="cart-o" text="购物车" @click="onClickIcon" />
            <van-action-bar-icon icon="shop-o" text="店铺" @click="onClickIcon" />
            <van-action-bar-button type="danger" text="立即购买" @click="onClickButton" />
        </van-action-bar>

    </div>
</template>

<script setup>
import { ref } from 'vue'
import { detailApi } from '@/api/api'
import { useRoute } from 'vue-router'
import router from '@/router'
const route = useRoute()
let detail = ref([])
detailApi(route.params.goods_id).then(res => {
    console.log('详情数据', res)
    detail.value = res.data.message
})

const onClickButton=()=>{
    router.push('/home/ddlb')
}
</script>

<style lang="scss" scoped></style>